package reflect;

import java.lang.reflect.Constructor;

public class ReflectDemo {
    public static void main(String[] args) throws Exception {
        Class cls = Class.forName("reflect.Person");
        Constructor c = cls.getConstructor(String.class,int.class);
        Object o = c.newInstance("刘桑",55);
        System.out.println(o);
    }
}
